<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class Test extends CI_Controller {

	function __construct()
	{
		parent::__construct();
		
	}
	
	
	

	function index()
	{
		
		//$this->test2();	
	}
	
	


	/*function test2()
	{
		list ($movies_queue, $games_queue) = $this->get_queue();
		
		if($movies_queue != FALSE)
			{
                                
                    
				// will fill up the empty spaces in the table with NULL
				$this->table->set_empty("&nbsp;");
				
				// set the heading of the table to contain the title to each culomn
				$this->table->set_heading('Order', 'Movie Title', 'Movie ID', 'Genre ID');
                                
                                // run a for loop for each row in the result array to add the link to add a specific movie from the resulted array to the queue
				
					
                                
                                $tmpl['row_start'] = '<li class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>';
                                $tmpl['row_end'] = '</li>';
                                        
                                 $this->table->set_template($tmpl);
			
				
				// generate the table with the two previous commands and the resulted queue of movies  and assign this generated table to an array
				$full_table['movies'] = $this->table->generate($movies_queue);
			}
			else
			{
				// assign FALSE the movies array so the code can distinguish between if we have table or not and print the error if not
				$full_table['movies'] = FALSE;
			}
			
			// check if there are games in the queue list and if TRUE a table will be generated and if FALSE nothing will be generated
			if($games_queue != FALSE)
			{
				// First will lear the table from any previous fills
				$this->table->clear();
				
				// will fill up the empty spaces in the table with NULL
				$this->table->set_empty("&nbsp;");
				
				// set the heading of the table to contain the title to each culomn
				$this->table->set_heading('Order', 'Game Title', 'Game ID', 'Genre ID');
                                
                                // run a for loop for each row in the result array to add the link to add a specific movie from the resulted array to the queue
				
				
				// generate the table with the two previous commands and the resulted queue of movies  and assign this generated table to an array
				$full_table['games'] = $this->table->generate($games_queue);
			}
			else
			{
				// assign FALSE the games array so the code can distinguish between if we have table or not and print the error if not
				$full_table['games'] = FALSE;
			}
//		foreach ( $movies_queue->result_array() as $row)
  //              {
    //               $data[] = $row; 
      //             echo $row['cus_priority'];
        //           echo $row['film_title'];
          //         echo "\n";
            //    }
                
         //           $hi['movies_queue'] = $data;
                
                //$data['movies_queue'] = $movies_queue->result_array();
                
                     //   echo $full_table['movies'];
                       $data = $movies_queue -> result_array(); 
                       $hi['movies_queue'] = $data;
                        
	$this->load->view('view_test', $hi);	
		
	}*/
	
	
	
	/*function get_queue()
	{
		//get the the customer id from the session cockie
		$cus_id = $this->session->userdata('cus_id');
		
		//get the customer movies queue, 1 as an input will means movies
		$movies_queue = $this->model_queue->model_get_queue($cus_id, 1);
		
		//get the customer games queue, 2 as an input will means games
		$games_queue = $this->model_queue->model_get_queue($cus_id, 2);
		
		
		// return both the movies and games queue list
		return array ($movies_queue, $games_queue);
		
		
	}*/
        
        /*function update_queue()
        {
            //get the the customer id from the session cockie
            $cus_id = $this->session->userdata('cus_id');
                
            extract($_POST);
            
            $i = 1;
            foreach ( $item as $key => $value )
            {
                
               $this->model_queue->model_update_queue($cus_id, $key, $value); 
            }
            
            
        }*/
}